package ui.actions;

import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;

import javax.swing.AbstractAction;
import javax.swing.KeyStroke;

import ui.Main;
import util.Util;

/**
 * Action for Save As.
 * @author TKington
 *
 */
public class SaveAsAction extends AbstractAction {
	/**
	 * Creates a SaveAsAction.
	 */
	public SaveAsAction() {
		putValue(NAME, "Save As");
		putValue(SHORT_DESCRIPTION, "Save As");
		putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_A, ActionEvent.CTRL_MASK));
		putValue(SMALL_ICON, Util.getIcon("SaveAs16.gif")); //$NON-NLS-1$
	}
	
	public void actionPerformed(ActionEvent evt) {
		Main.frame.onSaveFileAs();
	}
}